define(function (require, exports, module) {
  const { Vue } = require("vue");
  const { router } = require("./router/router.js");
  const { store } = require("./store/store.js");
  const loadStyles = require("loadStyles");
  loadStyles("src/app.css");
  const { nprogress } = require("nprogress");
  loadStyles("lib/nprogress/nprogress.css");

  Vue.config.productionTip = false;
  Vue.prototype.$progress = nprogress;

  router.beforeEach((to, from, next) => {
    console.log("[beforeEach]", from, to);
    nprogress.start();
    next();
  });

  router.afterEach((to, from) => {
    console.log("[afterEach]", from, to);
    nprogress.done();
  });

  new Vue({
    router,
    store,
    render: (h) =>
      h({
        template: `
        <div id="app">
          <RouterView></RouterView>
        </div>
        `,
      }),
  }).$mount("#app");
});
